<template>
    <section class="from_panel">
  				<el-form ref="form" :model="form" label-width="auto">
				 <el-form-item :label="item.name" v-for="(item, index) in checkBox" :key="index">
				  	 <el-radio-group v-model="form.type" v-if="item.type==='radio'">
				      <el-radio @change="changeImg(itemFirst.val)" v-for="(itemFirst,indexFirst) in item.checkBox" :key="indexFirst" :label="itemFirst.val" name="type">{{itemFirst.name}}</el-radio>
				     </el-radio-group>
	  			 </el-form-item>
				</el-form>
    </section>
</template>

<script>
    
    export default {
    	props:{
    		checkBox:''
    	},
        data(){
          return {
	          	form:{
	          		type:[],
	          	},
        	}
        },
        methods:{
        	changeImg(val){
        		this.$emit('changeImg',val);
        	}
        }
  };
</script>

<style>
    .from_panel .el-form-item{
    	margin-bottom: 5px;
    }
     .from_panel .el-radio__label{
     	color: #fff;
     }
    .from_panel .el-form-item__label{
			color: #59d1fd;
			font-size: 18px;
	}
	.from_panel .el-checkbox__inner{
		background: #4d5d72;
	}
	.from_panel .el-radio__inner{
		background: #4d5d72;
	}
	.from_panel .el-checkbox,.hot_area .el-radio{
		color: #fff;
	}
	.from_panel .el-radio+.el-radio{
		margin-left: 15px;
	}
	.from_panel .el-form-item{
		float: left;
		width: 50%;
	}
	.from_panel .el-radio__input.is-checked .el-radio__inner{
		border-color:unset;
		background:unset;
	}
	.from_panel .el-radio__inner::after{
		background: #5AD0F8;
		    width: 6px;
    	height: 6px;
	}
</style>